home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Bank smakow / BankSmakow.air / BankSmakow.swf / scripts / mx / effects / effectClasses / WipeDownInstance.as < prev    next >
Text File  |  2009-12-16  |  2KB  |  46 lines

  1. package mx.effects.effectClasses
  2. {
  3.    import mx.controls.SWFLoader;
  4.    import mx.core.mx_internal;
  5.    
  6.    use namespace mx_internal;
  7.    
  8.    public class WipeDownInstance extends MaskEffectInstance
  9.    {
  10.       
  11.       mx_internal static const VERSION:String = "3.5.0.12683";
  12.        
  13.       
  14.       public function WipeDownInstance(param1:Object)
  15.       {
  16.          super(param1);
  17.       }
  18.       
  19.       override protected function initMaskEffect() : void
  20.       {
  21.          var _loc2_:Number = NaN;
  22.          super.initMaskEffect();
  23.          var _loc1_:Number = target is SWFLoader && target.content ? Number(SWFLoader(target).contentHeight) : Number(targetVisualBounds.height / Math.abs(target.scaleY));
  24.          if(target.rotation != 0)
  25.          {
  26.             _loc2_ = target.rotation * Math.PI / 180;
  27.             _loc1_ = Math.abs(targetVisualBounds.width * Math.sin(_loc2_) + targetVisualBounds.height * Math.cos(_loc2_));
  28.          }
  29.          if(showTarget)
  30.          {
  31.             xFrom = targetVisualBounds.x;
  32.             yFrom = -effectMask.height + targetVisualBounds.y;
  33.             xTo = targetVisualBounds.x;
  34.             yTo = effectMask.height <= _loc1_ ? Number(_loc1_ - effectMask.height + targetVisualBounds.y) : Number(targetVisualBounds.y);
  35.          }
  36.          else
  37.          {
  38.             xFrom = targetVisualBounds.x;
  39.             yFrom = effectMask.height <= _loc1_ ? Number(targetVisualBounds.y) : Number(_loc1_ - effectMask.height + targetVisualBounds.y);
  40.             xTo = targetVisualBounds.x;
  41.             yTo = _loc1_ + targetVisualBounds.y;
  42.          }
  43.       }
  44.    }
  45. }
  46.